<?php 

include './function.php';

if(!empty($_POST['username']) && !empty($_POST['content'])){

	$data = $_POST;
	$data['create_time'] = time();

	$db = include './db.php';

	$db[] = $data;

	$str = var_export($db,true);

	$str = "<?php return ".$str." ?>";

	file_put_contents('./db.php', $str);

	success('留言成功','./index.php',3);

}else{
	error('数据不完整，请重新操作','./index.php',4);
}















 ?>